Lab Overview

Open-loop alpha response (Fig. 1)
Open-loop theta response (Fig. 2)
Open-loop voltage response (Fig. 3)

PI Controller Design & Analysis

The PI controller law V_m(s) = (k_p + k_i/s)·e(s) was substituted into the open-loop gyroscope model to derive the closed-loop transfer function G_CL(s). Matching its denominator to the standard second-order form s² + 2ζω_ns + ω_n² gave the gain expressions:

k_p = G_g(2ζω_nτ − 1) / K     k_i = G_gτω_n² / K

Using ζ = 1.05 (slightly overdamped), ω_n = 3.61 rad/s, and the system parameters: k_p = 19.79, k_i = 39.86. The experimental open-loop time constant was identified as τ = 0.87 s using the 63.2% criterion on the α step response. The open-loop model predicted α_ss = 8.43° but measured only 2.8° (66.8% error), explained by unmodeled gyroscopic coupling and sensor noise.

Closed-loop alpha tracking 2° (Fig. 4)
Closed-loop voltage response (Fig. 6)
Disturbance response — PI on (Fig. 7)

Results: Closed-Loop & Disturbance Rejection

Open-loop disturbance — alpha (Fig. 10)
Closed-loop alpha converged to 2° (Fig. 13)
Routh-Hurwitz table (Table 1)

MATLAB Code

Separate figures were generated for open-loop and closed-loop responses of α, θ, and V_m, overlaying transfer function predictions against measured hardware data. Full script: Lab 4 Appendix A.

% Open-loop alpha plot with TF overlay
figure()
plot(data_alpha(:,1), data_alpha(:,2))   % transfer function prediction
hold on
plot(data_alpha(:,1), data_alpha(:,3))   % measured system output
xlabel('Time (s)');  ylabel('Alpha (deg)')
title('Open Loop - Alpha Plot')
legend('Transfer Function', 'System Output', Location='northwest')

% Closed-loop with disturbance — PI ON
figure()
plot(data_alpha_PI(:,1), data_alpha_PI(:,2))   % TF
hold on
plot(data_alpha_PI(:,1), data_alpha_PI(:,3))   % measured
xlabel('Time (s)');  ylabel('Alpha (deg)')
title('Closed Loop with Disturbance - Alpha Plot')
legend('Transfer Function', 'System Output', Location='northwest')
Full MATLAB script — Lab 4 Appendix A
PI controller Simulink block
Gyroscope hardware setup

← Back to Dynamics & Control Labs